package com.demo.gulimall.seckill.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 首页轮播广告
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("sms_home_adv")
public class HomeAdv implements Serializable {
	/** id */
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** 名字 */
	@TableField(value = "`name`")
	private String name;

	/** 图片地址 */
	@TableField(value = "`pic`")
	private String pic;

	/** 开始时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`start_time`")
	private Date startTime;

	/** 结束时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`end_time`")
	private Date endTime;

	/** 状态 */
	@TableField(value = "`status`")
	private Byte status;

	/** 点击数 */
	@TableField(value = "`click_count`")
	private Integer clickCount;

	/** 广告详情连接地址 */
	@TableField(value = "`url`")
	private String url;

	/** 备注 */
	@TableField(value = "`note`")
	private String note;

	/** 排序 */
	@TableField(value = "`sort`")
	private Integer sort;

	/** 发布者 */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`publisher_id`")
	private Long publisherId;

	/** 审核者 */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`auth_id`")
	private Long authId;

}
